<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="../../comunes/header.jsp" />
<h2>Filtrado para OT</h2>
<form method="POST">
   <table class="tbl_formulario">
      <tr>
         <th>Fecha desde:</th><td><input type="text" name="fd" readonly="readonly"></td>
         <th>Fecha hasta:</th><td><input type="text" name="fh" readonly="readonly"></td>
      </tr>
      <tr><th>Estatus:</th>
         <td>
            <select name="est">
               <option value="T">Todos</option>
               <option value="A">Abierta</option>
               <option value="C">Complementada</option>
               <option value="P">En Pedido</option>
               <option value="F">Finalizada</option>
               <option value="X">Cancelada</option>
            </select>
         </td>
         <th>N&deg; Orden de trabajo:</th>
         <td><input type="text" name="no" placeholder="N&deg; OT" size="8" value="0"/></td>
      </tr>
      <tr>
         <td colspan="2">
            <button type="reset" class="btn_limpar" title="Lipiar los valores">Limpiar</button>
         </td>
         <td colspan="2" align="right">
            <button type="submit" class="btn_consultar" title="Consultar el historico">Consultar</button>
         </td>
      </tr>
   </table>
</form>
<script type="text/javascript">
   $(document).ready(function() {
      $(".btn_consultar").button({icons: {primary: "ui-icon-search"}});
      $(".btn_limpar").button({icons: {primary: "ui-icon-arrowrefresh-1-s"}});
      var mesAnterior = new Date();
      var mes = mesAnterior.getMonth() - 1;
      mesAnterior.setMonth(mes);
      $("input[name=fd]").datepicker({
         defaultDate: "-1m", changeMonth: true, changeYear: true, numberOfMonths: 2,
         dateFormat: "dd/mm/yy", autoSize: true, maxDate: new Date(),
         onClose: function(selectedDate) {
            $("input[name=fh]").datepicker("option", "minDate", selectedDate);
         }
      }).datepicker("setDate", mesAnterior);
      $("input[name=fh]").datepicker({
         changeMonth: true, changeYear: true, numberOfMonths: 2, dateFormat: "dd/mm/yy",
         autoSize: true, maxDate: new Date(),
         onClose: function(selectedDate) {
            $("input[name=fd]").datepicker("option", "maxDate", selectedDate);
         }
      }).datepicker("setDate", new Date());
   });
</script>
<jsp:include page="../../comunes/footer.jsp" />